<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use frontend\models\ArtForm;
use common\widgets\file_upload\FileUpload;
$this->title = '文章管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<h3 class="grh3tit">&nbsp;&nbsp;&nbsp;文章列表</h3>
<form class="registerform mt25" action="" id="subform" method='post'>
<input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
<table class="table table-striped table-bordered"><thead>
	<tr>
		<th>ID</th>
		<th><a data-sort="title">文章标题</a></th>
		<th><a data-sort="intro">简介</a></th>
		<th><a data-sort="status">发布状态</a></th>
		<th><a data-sort="created_at">创建时间</a></th>
		<th class="action-column">操作</th>
	</tr>

</thead>
<tbody>
<?php foreach($art as $key=>$vo){ ?>
<tr data-key="1">
	<td><?= $vo['id']; ?></td>
	<td><?= $vo['title']; ?></td>
	<td><?= $vo['intro']; ?></td>
	<?php if($vo['display'] == 0){ ?>
	<td><span class="label label-success"><?php  echo "待审核"; ?></span></td>
	<?php } elseif($vo['display'] == 40) { ?>
	<td><span class="label label-success"><?php  echo "已审核"; ?></span></td>
	<?php } else { ?>
	<td><span class="label label-success"><?php  echo "再审核"; ?></span></td>
	<?php } ?>
	<td><?= date("Y-m-d",$vo['created_at']);?></td>
<td>
<a href="" title="查看">&nbsp;&nbsp;<span class="glyphicon glyphicon-eye-open">查看</span></a>
<a href="<?= yii\helpers\Url::to(['art/update','id'=>$vo['id']]);?>" title="修改">&nbsp;&nbsp;<span class="glyphicon glyphicon-pencil">修改</span></a>
<a href="<?= yii\helpers\Url::to(['art/bin','id'=>$vo['id']]);?>" title="放入回收站" data-confirm="确认放入回收站？" data-method="post">&nbsp;&nbsp;<span class="glyphicon glyphicon-trash">放入回收站</span></a>
</td>
</tr>
<?php } ?>
</tbody>
</table>